package com.frinder.robot.strategy.action.biz;

import com.frinder.robot.strategy.action.ConvertTaskToActionBaseStrategy;
import com.frinder.robot.strategy.action.ConvertTaskToActionPayload;
import com.frinder.robot.task.meta.PointToPointRobotTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @ClassName ConvertPointToPointTaskToActionStrategy
 * @Description 转化机器人点到点任务为动作
 * @Author frinder
 * @Date 2019/10/18 14:09
 * @Verion 1.0
 */
@Slf4j
@Component
public class ConvertPointToPointTaskToActionStrategy extends ConvertTaskToActionBaseStrategy {
    @Override
    public void handle(ConvertTaskToActionPayload payload) {
        log.info("ApplyForTaskToActionPayload: {}", payload);
        if (payload.getTask() instanceof PointToPointRobotTask) {
            PointToPointRobotTask task = (PointToPointRobotTask) payload.getTask();

        } else {
            super.handle(payload);
        }
    }
}
